Optimizing focus plane position of imaging scanner

ABSTRACT

A method includes the following: (1) projecting a light pattern towards a target object; (2) detecting light returned from the target object through an imaging lens arrangement with an imaging sensor to capture a first image with changes in the position of the focus plane of the imaging lens arrangement; (3) processing the first image to determine an optimized position of the focus plane of the imaging lens arrangement; (4) detecting light returned from the target object with the imaging sensor to capture a second image when the position of the focus plane of the imaging lens arrangement is maintained at the optimized position; and (5) decoding a barcode in the second image.

FIELD OF THE DISCLOSURE

The present disclosure relates generally to imaging-based barcodescanners.

RELATED APPLICATIONS

This application is related to U.S. patent application Ser. No.14/090,883, filed Nov. 16, 2013.

BACKGROUND

Various electro-optical systems have been developed for reading opticalindicia, such as barcodes. A barcode is a coded pattern of graphicalindicia comprised of a series of bars and spaces of varying widths. In abarcode, the bars and spaces have different light reflectingcharacteristics. Some of the barcodes have a one-dimensional structurein which bars and spaces are spaced apart in one direction to form a rowof patterns. Examples of one-dimensional barcodes include UniformProduct Code (UPC), which is typically used in retail store sales. Someof the barcodes have a two-dimensional structure in which multiple rowsof bar and space patterns are vertically stacked to form a singlebarcode. Examples of two-dimensional barcodes include Code 49 andPDF417.

Systems that use one or more imaging sensors for reading and decodingbarcodes are typically referred to as imaging-based barcode readers,imaging scanners, or imaging readers. A imaging sensor generallyincludes a plurality of photosensitive elements or pixels aligned in oneor more arrays. Examples of imaging sensors include charged coupleddevices (CCD) or complementary metal oxide semiconductor (CMOS) imagingchips.

BRIEF DESCRIPTION OF THE FIGURES

The accompanying figures, where like reference numerals refer toidentical or functionally similar elements throughout the separateviews, together with the detailed description below, are incorporated inand form part of the specification, and serve to further illustrateembodiments of concepts that include the claimed invention, and explainvarious principles and advantages of those embodiments.

FIG. 1 shows an imaging scanner in accordance with some embodiments.

FIG. 2 is a schematic of an imaging scanner in accordance with someembodiments.

FIG. 3 shows that an aiming pattern is generated within the imagingfield of view (FOV) when light from the aiming light source is projectedthrough the aiming pattern generating element in accordance with someembodiments.

FIG. 4 shows that the aiming pattern generating element can include anaperture stop and an optical component in accordance with someembodiments.

FIG. 5 shows that an image of the aiming pattern is captured by theimaging sensor when the aiming pattern is projected on the surface of atarget object.

FIG. 6 shows a sample aiming pattern that can be used for quicklyfinding the proper position of the focus plane in accordance with someembodiments.

FIG. 7 is a timing diagram showing the exposure of the rows in a rollingshutter mode and the corresponding change of the lens position inaccordance with some embodiments.

FIG. 8 shows that the estimated peak can be obtained from aninterpolated curve in accordance with some embodiments.

FIG. 9 is a flowchart of a method for finding the proper position of thefocus plane to successfully decode a barcode image in accordance withsome embodiments.

FIG. 10 is a timing diagram showing the exposure of the rows in arolling shutter mode and the corresponding change of the lens positionin accordance with some embodiments.

FIG. 11 is a flowchart of an alternative method for finding the properposition of the focus plane to successfully decode a barcode image inaccordance with some embodiments.

FIGS. 12A-12B are timing diagrams each showing the capture ofslit-frame-images and the corresponding change of the lens position inaccordance with some embodiments.

FIGS. 13A-13B are timing diagrams each showing, in anotherimplementation, the capture of slit-frame-images and the correspondingchange of the lens position in accordance with some embodiments.

Skilled artisans will appreciate that elements in the figures areillustrated for simplicity and clarity and have not necessarily beendrawn to scale. For example, the dimensions of some of the elements inthe figures may be exaggerated relative to other elements to help toimprove understanding of embodiments of the present invention.

The apparatus and method components have been represented whereappropriate by conventional symbols in the drawings, showing only thosespecific details that are pertinent to understanding the embodiments ofthe present invention so as not to obscure the disclosure with detailsthat will be readily apparent to those of ordinary skill in the arthaving the benefit of the description herein.

DETAILED DESCRIPTION

A method includes the following: (1) projecting a light pattern towardsa target object; (2) detecting light returned from the target objectthrough an imaging lens arrangement with an imaging sensor to capture afirst image during a first frame exposure time period; (3) detectinglight returned from the target object through the imaging lensarrangement with the imaging sensor to capture a second image during asecond frame exposure time period; and (4) processing an image of abarcode in the second image to decode the barcode. When the first imageis captured, the average position of the focus plane of the imaginglens; arrangement during a first row-exposure-time period associatedwith a first selected row is different from the average position of thefocus plane of the imaging lens arrangement during a secondrow-exposure-time period associated with a second selected row. When thesecond image is captured, the position of the focus plane of the imaginglens arrangement during at least part of said second frame exposure timeperiod is maintained at an optimized position as determined fromprocessing the first image.

A method includes the following: (1) projecting a light pattern towardsa target object; (2) detecting light returned from the target objectthrough an imaging lens arrangement with an imaging sensor to capture atleast a first slit-frame-image and a second slit-frame-image; (3)determining an optimized position of the imaging lens arrangement; (4)detecting light returned from the target object through the imaging lensarrangement with the imaging sensor to capture an image of a barcodeduring a main frame exposure time period, and (5) processing the imageof the barcode to decode the barcode. The imaging sensor has rows ofphotosensitive elements arranged in a matrix. The average position ofthe focus plane of the imaging lens arrangement during the capture ofthe first slit-frame-image is different from the average position of thefocus plane of the imaging lens arrangement during the capture of thesecond slit-frame-image. Each of the first slit-frame-image and thesecond slit-frame-image has pixels located in no more than 32 rows ofphotosensitive elements in the matrix. In the method, determining theoptimized position includes processing at least the firstslit-frame-image and the second slit-frame-image. When the image of thebarcode is captured, the position of the focus plane of the imaging lensarrangement during at least part of said main frame exposure time periodis maintained at the optimized position as previously determined.

FIG. 1 shows an imaging scanner 50 in accordance with some embodiments.The imaging scanner 50 has a window 56 and a housing 58 with a handle.The imaging scanner 50 also has a base 52 for supporting itself on acountertop. The imaging scanner 50 can be used in a hands-free mode as astationary workstation when it is placed on the countertop. The imagingscanner 50 can also be used in a handheld mode when it is picked up offthe countertop and held in an operator's hand. In the hands-free mode,products can be slid, swiped past, or presented to the window 56. In thehandheld mode, the imaging scanner 50 can be moved towards a barcode ona product, and a trigger 54 can be manually depressed to initiateimaging of the barcode. In some implementations, the base 52 can beomitted, and the housing 58 can also be in other shapes. In FIG. 1, acable is also connected to the base 52. In other implementations, whenthe cable connected to the base 52 is omitted, the imaging scanner 50can be powered by an on-board battery and it can communicate with aremote host by a wireless link.

FIG. 2 is a schematic of an imaging scanner 50 in accordance with someembodiments. The imaging scanner 50 in FIG. 2 includes the followingcomponents: (1) an imaging sensor 62 positioned behind an imaging lensarrangement 60; (2) an illuminating lens arrangement 70 positioned infront of an illumination source 72; (3) an aiming lens arrangement 80positioned in front of an aiming light source 82; and (4) a controller90. In FIG. 2, the imaging lens arrangement 60, the illuminating lensarrangement 70, and the aiming lens arrangement 80 are positioned behindthe window 56. The imaging sensor 62 is mounted on a printed circuitboard 91 in the imaging scanner.

The imaging sensor 62 can be a CCD or a CMOS imaging device. The imagingsensor 62 generally includes multiple pixel elements. These multiplepixel elements can be formed by a one-dimensional array ofphotosensitive elements arranged linearly in a single row. Thesemultiple pixel elements can also be formed by a two-dimensional array ofphotosensitive elements arranged in mutually orthogonal rows andcolumns. The imaging sensor 62 is operative to detect light captured byan imaging lens arrangement 60 along an optical path or axis 61 throughthe window 56. Generally, the imaging sensor 62 and the imaging lensarrangement 60 are designed to operate together for capturing lightscattered or reflected from a barcode 40 as pixel data over atwo-dimensional field of view (FOV).

The barcode 40 generally can be located anywhere in a working range ofdistances between a close-in working distance (WD1) and a far-outworking distance (WD2). In one specific implementation, WD1 is in aclose proximity to the window 56, and WD2 is about a couple of feet fromthe window 56. In FIG. 2, the illuminating lens arrangement 70 and theillumination source 72 are designed to operate together for generatingan illuminating light towards the barcode 40 during an illumination timeperiod. The illumination source 72 can include one or more lightemitting diodes (LED). The illumination source 72 can also include alaser or other kind of light sources. The aiming lens arrangement 80 andthe aiming light source 82 are designed to operate together forgenerating a visible aiming light pattern towards the barcode 40. Suchaiming pattern can be used by the operator to accurately aim the imagingscanner at the barcode. The aiming light source 82 can include one ormore light emitting diodes (LED). The aiming light source 82 can alsoinclude a laser, LED, or other kind of light sources.

In FIG. 2, the controller 90, such as a microprocessor, is operativelyconnected to the imaging sensor 62, the illumination source 72, and theaiming light source 82 for controlling the operation of thesecomponents. The controller 90 can also be used to control other devicesin the imaging scanner. The imaging scanner 50 includes a memory 94 thatcan be accessible by the controller 90 for storing and retrieving data.In many embodiments, the controller 90 also includes a decoder fordecoding one or more barcodes that are within the field of view (FOV) ofthe imaging scanner 50. In some implementations, the barcode 40 can bedecoded by digitally processing a captured image of the barcode with amicroprocessor.

In operation, in accordance with some embodiments, the controller 90sends a command signal to energize the illumination source 72 for apredetermined illumination time period. The controller 90 then exposesthe imaging sensor 62 to capture an image of the barcode 40. Thecaptured image of the barcode 40 is transferred to the controller 90 aspixel data. Such pixel data is digitally processed by the decoder in thecontroller 90 to decode the barcode. The information obtained fromdecoding the barcode 40 is then stored in the memory 94 or sent to otherdevices for further processing.

Barcode imaging scanners typically project a bright aiming pattern(e.g., a dot, line, cross pattern, etc.) to assist the user in aimingthe scanner towards the barcode. When aimed properly, the aiming patternwill be projected onto the desired barcode. As shown in FIG. 3, anaiming pattern 88 can be generated within the imaging field of view(FOV) when the visible light from the aiming light source is projectedthrough the aiming pattern generating element 80. In FIG. 3, the aimingpattern 88 is in the form of an aiming cross-wire that includes twolines of visible illumination: a horizontal line of visible illumination88H and a vertical line of visible illumination 88V.

In one implementation, as shown in FIG. 4, the aiming pattern generatingelement 80 includes an aperture stop 86 and an optical component 84. Theoptical component 84 in FIG. 4 is a refractive optical element (ROE).Specifically, in one implementation, the rear portion of the opticalcomponent 84 is formed with a plurality of refractive structures (e.g.,84A, 84B, 84C, . . . ) for refracting the light beam from the laserdiode 82. There are many possible implementations of the opticalcomponent 84. Some implementations of the optical component 84—includingthe implementation as shown in FIG. 4—are described in more detail inU.S. Pat. No. 7,182,260, titled “Aiming light pattern generator inimaging readers for electro-optically reading indicia.” In some otherembodiments, the optical component 84 in FIG. 4 can also be adiffractive optical element (DOE) that includes a plurality ofinterferometric elements for generating the aiming pattern by lightinterference. Some implementations of the diffractive optical element(DOE) are described in more detail in U.S. Pat. No. 6,060,722.

As shown in FIG. 5, when the aiming pattern 88 is projected on thesurface of a target object 45, an image of the aiming pattern 88 can becaptured by the imaging sensor 62 to create some pixel data during anexposure time period. In one implementation, the aiming pattern 88 is inthe form of an aiming cross wire.

Some of the imaging scanners can include an auto-focus system to enablea barcode be more clearly imaged with the imaging sensor 62 based on themeasured distance of this barcode. In some implementations of theauto-focus system, the position of the focus plane of the imaging lensarrangement 60 is adjusted based on the measured distance “d” betweenthe target object 45 and the imaging scanner 50. In some otherimplementations of the auto-focus system, the sharpness of the image ofthe aiming cross-wire can be used to determine the position of the focusplane of the imaging lens arrangement.

Auto-focusing in a barcode imaging engine usually requires a series ofimage frames to be captured in order to set the proper position of thefocus plane of the lens system. The process begins by capturing aninitial image at one lens position. This image is evaluated and theposition of the focus plane of the lens system is adjusted and then asecond image is captured. The second image is evaluated and the positionof the focus plane of the lens system is adjusted again before anotherimage is captured. This process is repeated until an image withacceptable focus is captured. The process can require many frames andcan severely impact the amount of time it takes to obtain a successfulbarcode decode.

Image sensors are available in two broad varieties: global shutter androlling shutter. In a global shutter sensor, all rows of the image arrayare exposed at the same time. This most closely mimics a mechanicalshutter type system and is typically the preferred type of sensor, butthis functionality comes with a high cost.

In a rolling shutter sensor, the image rows are not exposed at the sametime. A rolling shutter sensor captures an image by starting to exposethe first image row, then a short time later it starts to expose thesecond image row, then a short time later it starts to expose the thirdimage row, etc. Although the time of exposure of the first row willoverlap with the time of exposure of several subsequent rows, theexposure of the first row will end before some rows have even beguntheir time of exposure. In this way, capturing an image with a rollingshutter sensor is more like capturing a series of images that areoverlapping in time. Although this method of image capture can lead todistortions in fast moving images, rolling shutter sensors are stillused because of the their size and cost advantages over global shuttersensors.

Laser aiming systems are used in some imager based barcode scanners toassist the user in positioning the barcode scanner. The laser aimingsystem projects a pattern (cross-hair, box, bright spot, etc.) onto theobject being decoded to show the user where the barcode should bepositioned. Typically, the aiming pattern is turned off when the imageis captured by the sensor.

In some implementations, the imaging scanner 50 includes both a variablefocusing element (such as a motor-controlled mechanical lens assembly ora liquid lens assembly) and a laser aiming system. Such imaging scannercan take advantage of the rolling shutter's staggered exposure operationto provide a method of quickly finding the proper position of the focusplane to successfully decode a barcode image. FIG. 6 shows a sampleaiming pattern that can be used for quickly finding the proper positionof the focus plane in accordance with some embodiments.

FIG. 7 is a timing diagram showing the exposure of the rows in a rollingshutter mode and the corresponding change of the lens position inaccordance with some embodiments. At the beginning of a scanningsession, or at any time that auto-focusing must be performed, the lensof the auto-focus element is set to its nearest focal position and thelaser aiming system is activated. The laser aiming pattern is designedin such a way that at least one portion of the aiming pattern contains aseries of parallel vertical lines that extend to the top and bottom ofthe field of view. The image sensor is commanded to acquire an image andit begins to expose the first row of the image; a short time later, itbegins to expose the second row of the image; a short time later, itexposes the third line of the image; and so on. While the image sensorrows are being exposed, the auto-focus element is swept from its nearestposition of the focus plane to its farthest position of the focus planeby adjusting its control signal (typically a voltage or currentsetting). The sweep is controlled in such a way that the lens reachesits farthest position of the focus plane approximately when the lastrows of the image are being exposed. In this way, each row of the imageis exposed with the lens at a different position of the focus plane.

When the image capture is complete, software or custom hardware is usedto find the vertical aiming lines in each row of the image, and assignseach row a score based upon how well the aiming lines are focused. Inone example, FIG. 8 shows the focus score for individual row as afunction of the row number in accordance with some embodiments. The rowwith the highest focus score represents the “optimal” position of thefocus plane. The location of this row within the image is then used toestimate the value of the lens control signal when that row was exposed.The lens control signal is then set to this value to move the lens tothe “optimal” position of the focus plane. Thus instead of capturing animage, changing the lens position, capturing another image and changingthe lens position again, etc., the final position of the focus plane canbe found after acquiring only one image.

The method of finding the “optimal” position of the focus plane asdescribed above can have the advantage that it doesn't require anycalibration of the lens control system. Prior imaging engines have usedthe parallax of a laser aiming spot to determine the distance to abarcode; the lens could then be moved to focus at that distance. Butsuch a method requires a closed loop system where the mapping betweenthe lens control signal and the lens position is precisely known. Themethod of finding the “optimal” position of the focus plane as describedabove can work with a focusing system that has a wide variability overtime, temperature, etc., since the optimal lens control signal value isalways estimated from a new image acquired at the current environmentalconditions.

Additionally, determining the optimal position of the focus plane of thelens does not require the calculation of a focus score on every line ofthe image. There will be cases in which the vertical lines that are usedfor focusing will not be present on some rows or in which they cannot beseparated from other elements on those rows. In these cases, the bestfocusing position can be interpolated from the rows in which a focusingscore can be generated by estimating the peak focusing score from theavailable data. For example, as shown in FIG. 8, the estimated peak canbe obtained from an interpolated curve.

FIG. 9 is a flowchart of a method 200 for finding the proper position ofthe focus plane to successfully decode a barcode image in accordancewith some embodiments. The method 200 includes block 210, block 220,block 230, block 240, and block 250.

The method 200 can be implemented on an imaging scanner that has animaging sensor, an imaging lens arrangement, and a light patternarrangement. The imaging sensor has rows of photosensitive elementsarranged in a matrix. The imaging sensor is configured to capture animage from a target object during a frame exposure time period. In theimaging sensor, each row of photosensitive elements is associated with acorresponding row exposure time period. The imaging lens arrangementconfigured to operate together with the imaging sensor for detectinglight from the target object within a field of view. The light patternarrangement is configured to generate a light pattern projected towardsthe target object. The imaging sensor can operate in rolling shuttermode. When operating in rolling shutter mode, each given row ofphotosensitive elements is associated with a corresponding row exposuretime period during which the amount of light impinging upon on eachphotosensitive element in the given row is converted into electricalsignal. In rolling shutter mode, the frame exposure time covers the rowexposure time periods for all rows in the imaging sensor.

In the method 200 of FIG. 9, at block 210, a light pattern is projectedtowards a target object. At block 220, light returned from the targetobject is detected through an imaging lens arrangement with an imagingsensor to capture a first image during a first frame exposure timeperiod with changes in the position of the focus plane of the imaginglens arrangement. At block 230, the first image is processed todetermine an optimized position of the focus plane of the imaging lensarrangement. At block 240, light returned from the target object isdetected through the imaging lens arrangement with the imaging sensorduring a second frame exposure time period to capture a second imagewhen the position of the focus plane of the imaging lens arrangement ismaintained at the optimized position of the focus plane. At block 250,an image of a barcode in the second image is processed to decode thebarcode.

In the method 200 of FIG. 9, at block 210, when a light pattern isprojected towards a target object, the light pattern can include atleast a first sub-pattern extending in a first direction and a secondsub-pattern extending in a second direction that is perpendicular to thefirst direction. In some implementations, the length of the firstsub-pattern along the first direction covers more than 50% of thedimension of an imaging field of view along the first direction, and thelength of the second sub-pattern along the second direction covers morethan 50% of the dimension of the imaging field of view along the seconddirection. For example, as shown in FIG. 3 and FIG. 6, the light patterncan be an aiming pattern that includes a first sub-pattern 88V extendingin the vertical direction and a second sub-pattern 88H extending thehorizontal direction. In the implementations as shown in FIG. 3 and FIG.6, the length of the first sub-pattern 88V covers 100% of the verticaldimension of the imaging field of view, and the length of the secondsub-pattern along 88H covers 100% of the horizontal dimension of theimaging field of view. Furthermore, the first sub-pattern 88V extendingin the vertical direction does not have to be continuous, and the firstsub-pattern 88V can have gaps (i.e., the vertical pattern lines canappear to be broken lines). The second sub-pattern 88H extending in thehorizontal direction also does not have to be continuous.

In the method 200 of FIG. 9, at block 220, when light returned from thetarget object is detected to capture a first image during a first frameexposure time period, it also involves changes in the position of thefocus plane of the imaging lens arrangement. For example, in theimplementation as shown in FIG. 10, the position of the focus plane ofthe imaging lens arrangement increases monotonically during the timeperiod that covers at least all of the row-exposure-time periods for therows 101-118. In the implementation as shown in FIG. 10, the averageposition of the focus plane of the imaging lens arrangement during therow-exposure-time period for each one of the rows 101-118 is differentfrom the average position of the focus plane of the imaging lensarrangement during the row-exposure-time period for each other one ofthe rows 101-118.

In other implementations, the position of the focus plane of the imaginglens arrangement does not have to be changed monotonically. The positionof the focus plane of the imaging lens arrangement can be changed inmany ways, to make the average position of the focus plane of theimaging lens during a first row-exposure-time period different from theaverage position of the focus plane of the imaging lens during a secondrow-exposure-time period. For example, in FIG. 10, the row-exposure-timeperiod for a first selected row 104 is from t1 to t2, and therow-exposure-time period for a second selected row 116 is from t3 to t4;clearly, in FIG. 10, the average position of the focus plane of theimaging lens arrangement during the time from t1 to t2 is different fromthe average position of the focus plane of the imaging lens arrangementduring the time from t3 to t4.

Additionally, in one implementation, the light pattern is projectedtowards the target object during a time period that covers at least thefirst row-exposure-time period for the row 104 and the secondrow-exposure-time period for the row 116. In one example, the lightpattern is projected towards the target object at least from time t1 totime t4, and the focus scores for all of the rows 104-116 can becompared at block 230 in FIG. 9. Alternatively, in another example, thelight pattern is projected towards the target object at least from timet1 to time t2 and from time t3 to time t4, and the focus scores for atleast the row 104 and the row 116 can be compared at block 230 in FIG.9.

Furthermore, when the light pattern is projected towards the targetobject, the first image captured by the imaging sensor can include animage generated by the light pattern. In one implementation, such imagegenerated can have pixels located in at least 50% of the rows ofphotosensitive elements in the matrix. For example, in oneimplementation, among a total of 1024 rows, the photosensitive elementsfrom the row 200 to the row 824 can includes pixels of the imagegenerated by the light pattern. In some implementation, the imagegenerated by the light pattern can have pixels located in at least 80%of the rows of photosensitive elements in the matrix.

In the method 200 of FIG. 9, at block 230, in some implementations, atleast two parts of the first image are compared to determine theposition of the focus plane of the imaging lens arrangement during atleast part of said second frame exposure time period. The first part ofthe first image includes pixels captured with photosensitive elements atleast in the first selected row, and the second part of the first imageincludes pixels captured with photosensitive elements at least in thesecond selected row. For example, the focus score for the row 104 can becompared with the focus score for the row 116 to determine the positionof the focus plane. In most implementations, the focus scores of morethan two rows are used in an analytical process to determine theposition of the focus plane of the imaging lens arrangement. One suchexample is shown in FIG. 8, in which the optimal position of the focusplane is obtained from an interpolated curve that is based on the datafitting of the focus scores of many rows.

In the method 200 of FIG. 9, at block 240, in one implementation, thesecond image can be captured in rolling shutter mode during the secondframe exposure time period. In another implementation, the second imagecan be captured in global shutter mode during the second frame exposuretime period.

FIG. 11 is a flowchart of an alternative method 300 for finding theproper position of the focus plane to successfully decode a barcodeimage in accordance with some embodiments. The method 300 includes block310, block 320, block 330, block 340, and block 350. In someimplementations, the method 300 as shown in FIG. 11 can be implementedwith an imaging sensor that supports the mode for capturingslit-frame-images. To capture a slit-frame-image, multiple rows ofphotosensitive elements are exposed together during the same slit-frametime period. Quite often, these multiple rows constitute only a smallfraction of the total number of rows in the imaging sensor, andconsequently the pixel values of these multiple rows can be quicklytransferred from the imaging sensor to other memories in an ASIC or inanother microprocessor. For example, transferring the pixel values from32 rows of pixel elements can be much faster than transferring the pixelvalues from all 1024 rows of pixel elements in an example imagingsensor. Because a slit-frame-image can be captured and transferred muchquickly than a full frame image, it is possible to rely upon multipleslit-frame-images for quickly finding the proper position of the focusplane of an imaging system.

In the method 300 of FIG. 11, at block 310, a light pattern is projectedtowards a target object. At block 320, light returned from the targetobject is detected through an imaging lens arrangement with an imagingsensor to capture multiple slit-frame-images with changes in theposition of the focus plane of the imaging lens arrangement. At block330, at least some of the multiple slit-frame-images are processed todetermine au optimized position of the focus plane of the imaging lensarrangement. At block 340, light returned from the target object isdetected through the imaging lens arrangement with the imaging sensorduring a main frame exposure time period to capture an image of abarcode when the position of the focus plane of the imaging lensarrangement is maintained at the optimized position of the focus plane.In some embodiments, the position of the focus plane of the imaging lensarrangement is maintained at the optimized position of the focus planeduring at least part of the main frame exposure time period. At block350, the image of the barcode is processed to decode the barcode.

In the method 300 of FIG. 11, at block 320, when the multipleslit-frame-images are captured, each of the multiple slit-frame-imagesgenerally have pixels located in no more than 32 rows of photosensitiveelements. Depending upon specific implementations, a slit-frame-imagecan have anywhere between one row to thirty-two rows of pixels. Forexample, a slit-frame-image can have 32 rows of pixels, 16 rows ofpixels, 8 rows of pixels, 4 rows of pixels, 2 rows of pixels, or asingle row of pixels.

In some embodiments of the method 300, at block 330, the determinationof the optimized position of the imaging lens arrangement can includeprocessing at least some of the multiple slit-frame-images. In someembodiments, the focus sharpness of at least some of the multipleslit-frame-images are compared to determine the optimized position ofthe focus plane. In some embodiments, given a subgroup of the multipleslit-frame-images, the average position of the focus plane of theimaging lens arrangement during the capture of each one of theslit-frame-images in the subgroup has a value different from the averageposition of the focus plane of the imaging lens arrangement during thecapture of each other one of the slit-frame-images in the subgroup.

In some embodiments of the method 300, at block 320, at least a firstslit-frame-image and a second slit-frame-image are captured.Furthermore, at block 330, the determination of the optimized positionof the imaging lens arrangement can include processing at least thefirst slit-frame-image and the second slit-frame-image. For example, thedetermination of the optimized position can include comparing the focussharpness of the first slit-frame-image with the focus sharpness of thesecond slit-frame-image.

FIGS. 12A-12B are timing diagrams each showing the capture ofslit-frame-images and the corresponding change of the lens position inaccordance with some embodiments. In the example as shown in FIGS.12A-12B, multiple slit-frame-images are captured during slit-frame timeperiod T₁, T₂, T₃, T₄, etc. The slit-frame-image captured duringslit-frame time period T₁ are composed from the pixels in rows 101, 102,103, and 104. The slit-frame-image captured during slit-frame timeperiod T₂ are composed from the pixels in rows 105, 106, 107, and 108.The slit-frame-image captured during slit-frame time period T₃ arecomposed from the pixels in rows 109, 110, 111, and 112. Theslit-frame-image captured during slit-frame time period T₄ are composedfrom the pixels in rows 113, 114, 115, and 116. In FIG. 12A, while themultiple slit-frame-images are captured during slit-frame time periodT₁, T₂, T₃, and T₄, the position of the focus plane of the imaging lensarrangement are monotonically increased. In FIG. 12B, the position ofthe focus plane of the imaging lens arrangement is essentiallymaintained at constant during the capture of each of the multipleslit-frame-images as shown in the figure, but the position of the focusplane for each of the multiple slit-frame-images captured during T₁, T₂,T₃, and T₄ are increased monotonically.

In general, depend on the implementation, the position of the focusplane for each of the multiple slit-frame-images captured sequentiallycan increase monotonically, decrease monotonically, or change in othermore complicated ways. Additionally, in alternative embodiments as shownin FIG. 13A-13B, the multiple slit-frame-images captured duringslit-frame time period T1, T2, T3, and T4 can be all from the same groupof rows (e.g., all from rows 101, 102, 103, and 104). In still someother embodiments, some multiple slit-frame-images can be from the samegroup of rows, but some other multiple slit-frame-images can be from thedifferent group of rows. Furthermore, in the embodiment as shown in FIG.12A-12B, each of the multiple slit-frame-images captured includes 4 rowsof pixels, but in other embodiments, the multiple slit-frame-imagescaptured do not all have the same number of rows (e.g., some may have 3rows while some others may have 5 rows).

In FIGS. 12A-12B and FIGS. 13A-13B, after the capture of the multipleslit-frame-images, the focus sharpness of these multipleslit-frame-images can be compared to determine the optimized position ofthe imaging lens arrangement. Once such optimized position isdetermined, during the next frame exposure time period, an image of abarcode can be captured when the position of the focus plane of theimaging lens arrangement is maintained at the optimized position of thefocus plane. Thereafter, the image of the barcode is processed to decodethis captured barcode.

In the foregoing specification, specific embodiments have beendescribed. However, one of ordinary skill in the art appreciates thatvarious modifications and changes can be made without departing from thescope of the invention as set forth in the claims below. Accordingly,the specification and figures are to be regarded in an illustrativerather than a restrictive sense, and all such modifications are intendedto be included within the scope of present teachings.

The benefits, advantages, solutions to problems, and any element(s) thatmay cause any benefit, advantage, or solution to occur or become morepronounced are not to be construed as a critical, required, or essentialfeatures or elements of any or all the claims. The invention is definedsolely by the appended claims including any amendments made during thependency of this application and all equivalents of those claims asissued.

Moreover in this document, relational terms such as first and second,top and bottom, and the like may be used solely to distinguish oneentity or action from another entity or action without necessarilyrequiring or implying any actual such relationship or order between suchentities or actions. The terms “comprises,” “comprising,” “has”,“having,” “includes”, “including,” “contains”, “containing” or any othervariation thereof, are intended to cover a non-exclusive inclusion, suchthat a process, method, article, or apparatus that comprises, has,includes, contains a list of elements does not include only thoseelements but may include other elements not expressly listed or inherentto such process, method, article, or apparatus. An element proceeded by“comprises . . . a”, “has . . . a”, “includes . . . a”, “contains . . .a” does not, without more constraints, preclude the existence ofadditional identical elements in the process, method, article, orapparatus that comprises, has, includes, contains the element. The terms“a” and “an” are defined as one or more unless explicitly statedotherwise herein. The terms “substantially”, “essentially”,“approximately”, “about” or any other version thereof, are defined asbeing close to as understood by one of ordinary skill in the art, and inone non-limiting embodiment the term is defined to be within 10%, inanother embodiment within 5%, in another embodiment within 1% and inanother embodiment within 0.5%. The term “coupled” as used herein isdefined as connected, although not necessarily directly and notnecessarily mechanically. A device or structure that is “configured” ina certain way is configured in at least that way, but may also beconfigured in ways that are not listed.

It will be appreciated that some embodiments may be comprised of one ormore generic or specialized processors (or “processing devices”) such asmicroprocessors, digital signal processors, customized processors andfield programmable gate arrays (FPGAs) and unique stored programinstructions (including both software and firmware) that control the oneor more processors to implement, in conjunction with certainnon-processor circuits, some, most, or all of the functions of themethod and/or apparatus described herein. Alternatively, some or allfunctions could be implemented by a state machine that has no storedprogram instructions, or in one or more application specific integratedcircuits (ASICs), in which each function or some combinations of certainof the functions are implemented as custom logic. Of course, acombination of the two approaches could be used.

Moreover, an embodiment can be implemented as a computer-readablestorage medium having computer readable code stored thereon forprogramming a computer (e.g., comprising a processor) to perform amethod as described and claimed herein. Examples of suchcomputer-readable storage mediums include, but are not limited to, ahard disk, a CD-ROM, an optical storage device, a magnetic storagedevice, a ROM (Read Only Memory), a PROM (Programmable Read OnlyMemory), an EPROM (Erasable Programmable Read Only Memory), an EEPROM(Electrically Erasable Programmable Read Only Memory) and a Flashmemory. Further, it is expected that one of ordinary skill,notwithstanding possibly significant effort and many design choicesmotivated by, for example, available time, current technology, andeconomic considerations, when guided by the concepts and principlesdisclosed herein will be readily capable of generating such softwareinstructions and programs and ICs with minimal experimentation.

The Abstract of the Disclosure is provided to allow the reader toquickly ascertain the nature of the technical disclosure. It issubmitted with the understanding that it will not be used to interpretor limit the scope or meaning of the claims. In addition, in theforegoing Detailed Description, it can be seen that various features aregrouped together in various embodiments for the purpose of streamliningthe disclosure. This method of disclosure is not to be interpreted asreflecting an intention that the claimed embodiments require morefeatures than are expressly recited in each claim. Rather, as thefollowing claims reflect, inventive subject matter lies in less than allfeatures of a single disclosed embodiment. Thus the following claims arehereby incorporated into the Detailed Description, with each claimstanding on its own as a separately claimed subject matter.

What is claimed is:
 1. A method comprising: projecting a light patterntowards a target object; detecting light returned from the target objectthrough an imaging lens arrangement with an imaging sensor to capture afirst image during a first frame exposure time period, the imagingsensor having rows of photosensitive elements arranged in a matrixwherein each row of photosensitive elements is associated with acorresponding row-exposure-time period, and wherein the average positionof the focus plane of the imaging lens arrangement during a firstrow-exposure-time period associated with a first selected row isdifferent from the average position of the focus plane of the imaginglens arrangement during a second row-exposure-time period associatedwith a second selected row, with both the first row-exposure-time periodand the second row-exposure-time period allocated within said firstframe exposure time period; detecting light returned from the targetobject through the imaging lens arrangement with the imaging sensor tocapture a second image during a second frame exposure time period,wherein the position of the focus plane of the imaging lens arrangementduring at least part of said second frame exposure time period ismaintained at an optimized position as determined from processing thefirst image; processing an image of a barcode in the second image todecode the barcode; comparing a first part of the first image with asecond part of the first image to determine the position of the focusplane of the imaging lens arrangement during at least part of saidsecond frame exposure time period; and wherein the first part of thefirst image includes pixels captured with photosensitive elements atleast in the first selected row, and the second part of the first imageincludes pixels captured with photosensitive elements at least in thesecond selected row.
 2. The method of claim 1, further comprising:projecting a light pattern towards the target object during a timeperiod that covers at least the first row-exposure-time period and thesecond row-exposure-time period.
 3. The method of claim 1, furthercomprising: changing the position of the focus plane of the imaging lensarrangement at least during a part of said first frame exposure timeperiod.
 4. The method of claim 1, further comprising: changing theposition of the focus plane of the imaging lens arrangementmonotonically during a time period that covers at least the firstrow-exposure-time period and the second row-exposure-time period.
 5. Themethod of claim 1, wherein: the first image captured by the imagingsensor includes an image generated by the light pattern, with the imagegenerated having pixels located in at least 50% of the rows ofphotosensitive elements in the matrix.
 6. The method of claim 1,wherein: the first image captured by the imaging sensor includes animage generated by the light pattern, with the image generated havingpixels located in at least 80% of the rows of photosensitive elements inthe matrix.
 7. The method of claim 1, wherein said detecting lightreturned from the target object comprises: capturing the second image inrolling shutter mode during the second frame exposure time period. 8.The method of claim 1, wherein said detecting light returned from thetarget object comprises: capturing the second image in global shuttermode during the second frame exposure time period.
 9. A methodcomprising: projecting a light pattern towards a target object;detecting light returned from the target object through an imaging lensarrangement with an imaging sensor to capture a first image during afirst frame exposure time period, the imaging sensor having rows ofphotosensitive elements arranged in a matrix wherein each row ofphotosensitive elements is associated with a correspondingrow-exposure-time period, and wherein the average position of the focusplane of the imaging lens arrangement during a first row-exposure-timeperiod associated with a first selected row is different from theaverage position of the focus plane of the imaging lens arrangementduring a second row-exposure-time period associated with a secondselected row, with both the first row-exposure-time period and thesecond row-exposure-time period allocated within said first frameexposure time period; detecting light returned from the target objectthrough the imaging lens arrangement with the imaging sensor to capturea second image during a second frame exposure time period, wherein theposition of the focus plane of the imaging lens arrangement during atleast part of said second frame exposure time period is maintained at anoptimized position as determined from processing the first image;processing an image of a barcode in the second image to decode thebarcode; and projecting a light pattern towards the target object duringa time period that covers at least the first row-exposure-time periodand the second row-exposure-time period, wherein the light patternincludes at least a first sub-pattern extending in a first direction anda second sub-pattern extending in a second direction that isperpendicular to the first direction, wherein the length of the firstsub-pattern along the first direction covers more than 50% of thedimension of an imaging field of view along the first direction, andwherein the length of the second sub-pattern along the second directioncovers more than 50% of the dimension of the imaging field of view alongthe second direction.
 10. An apparatus comprising: an imaging sensorhaving rows of photosensitive elements arranged in a matrix, the imagingsensor being configured to capture an image from a target object duringa frame exposure time period wherein each row of photosensitive elementsis associated with a corresponding row exposure time period; an imaginglens arrangement configured to operate together with the imaging sensorfor detecting light from the target object within a field of view; alight pattern arrangement configured to generate a light patternprojected towards the target object; a controller operative to changethe position of the focus plane of the imaging lens arrangement duringat least a fraction of a first frame exposure time period when a firstimage is captured with the imaging sensor, to process the first image todetermine an optimized position of the focus plane of the imaging lensarrangement, and to cause the imaging sensor to capture a second imageduring a second frame exposure time period when the position of thefocus plane of the imaging lens arrangement during at least part of saidsecond frame exposure time period is maintained at the optimizedposition as determined from processing the first image; and the firstpart of the first image includes pixels captured with photosensitiveelements at least in a first selected row, and the second part of thefirst image includes pixels captured with photosensitive elements atleast in a second selected row.
 11. The apparatus of claim 10, wherein:the controller is operative to process an image of a barcode in thesecond image to decode the barcode.
 12. The apparatus of claim 10,wherein the controller is operative to change the position of the focusplane of the imaging lens arrangement during a time period that coversat least a first row-exposure-time period and a second row-exposure-timeperiod within the first frame exposure time period.
 13. The apparatus ofclaim 10, wherein the controller is operative to change the position ofthe focus plane of the imaging lens arrangement monotonically during atime period that covers at least a first row-exposure-time period and asecond row-exposure-time period within the first frame exposure timeperiod.
 14. The apparatus of claim 10, wherein: the first image capturedby the imaging sensor includes an image generated by the light patternwith the image generated having pixels located in at least 50% of therows of photosensitive elements in the matrix.
 15. The apparatus ofclaim 10, wherein: the first image captured by the imaging sensorincludes an image generated by the light pattern with the imagegenerated having pixels located in at least 80% of the rows ofphotosensitive elements in the matrix.
 16. The apparatus of claim 10,wherein the controller is operative to compare a first part of the firstimage with a second part of the first image to determine the position ofthe focus plane of the imaging lens arrangement during at least part ofsaid second frame exposure time period.